#pragma once
#include "NtHread.h"
#include "Struct.h"
#ifdef __cplusplus
extern "C"
{
#endif

	extern POBJECT_TYPE *IoDriverObjectType;

	UCHAR* PsGetProcessImageFileName(PEPROCESS Process);
	

	NTSYSAPI NTSTATUS NTAPI ZwQuerySystemInformation
	(
		IN ULONG	SystemInformationClass,
		OUT PVOID	SystemInformation,
		IN ULONG	Length,
		OUT PULONG	ReturnLength
	);

	NTKERNELAPI PVOID NTAPI PsGetProcessWow64Process(
		_In_ PEPROCESS Process
	);

	NTKERNELAPI PPEB NTAPI PsGetProcessPeb(
		_In_ PEPROCESS Process
	);

	NTSTATUS NTAPI MmCopyVirtualMemory(IN PEPROCESS SourceProcess,
		IN PVOID SourceAddress,
		IN PEPROCESS TargetProcess,
		OUT PVOID TargetAddress,
		IN SIZE_T BufferSize,
		IN KPROCESSOR_MODE PreviousMode,
		OUT PSIZE_T ReturnSize);

	NTKERNELAPI
		NTSTATUS
		ObReferenceObjectByName(
			__in PUNICODE_STRING ObjectName,
			__in ULONG Attributes,
			__in_opt PACCESS_STATE AccessState,
			__in_opt ACCESS_MASK DesiredAccess,
			__in POBJECT_TYPE ObjectType,
			__in KPROCESSOR_MODE AccessMode,
			__inout_opt PVOID ParseContext,
			__out PVOID *Object
		);
	NTKERNELAPI
		NTSTATUS
		ObOpenObjectByName(
			_In_ POBJECT_ATTRIBUTES ObjectAttributes,
			_In_ POBJECT_TYPE ObjectType,
			_In_ KPROCESSOR_MODE AccessMode,
			_In_opt_ PACCESS_STATE PassedAccessState,
			_In_ ACCESS_MASK DesiredAccess,
			_Inout_ PVOID ParseContext,
			_Out_ PHANDLE Handle
		);

	NTKERNELAPI PVOID PsGetProcessSectionBaseAddress(__in PEPROCESS Process);

#ifdef __cplusplus
}
#endif
